diff options
Diffstat (limited to 'app/[lng]/evcp/pq/[vendorId]/page.tsx')
| -rw-r--r-- | app/[lng]/evcp/pq/[vendorId]/page.tsx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/[lng]/evcp/pq/[vendorId]/page.tsx b/app/[lng]/evcp/pq/[vendorId]/page.tsx new file mode 100644 index 00000000..cb4277f1 --- /dev/null +++ b/app/[lng]/evcp/pq/[vendorId]/page.tsx @@ -0,0 +1,38 @@ +import * as React from "react" +import { Shell } from "@/components/shell" +import { Skeleton } from "@/components/ui/skeleton" + +import { type SearchParams } from "@/types/table" +import { getPQDataByVendorId } from "@/lib/pq/service" +import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton" +import { Vendor } from "@/db/schema/vendors" +import { findVendorById } from "@/lib/vendors/service" +import VendorPQReviewPage from "@/components/pq/pq-review-detail" +import VendorPQAdminReview from "@/components/pq/pq-review-detail" + +interface IndexPageProps { + params: { + vendorId: string // Updated from 'id' to 'contractId' to match route parameter + } + searchParams: Promise<SearchParams> +} + +export default async function DocumentListPage(props: IndexPageProps) { + const resolvedParams = await props.params + const vendorId = resolvedParams.vendorId // Updated from 'id' to 'contractId' + + const idAsNumber = Number(vendorId) + + const data = await getPQDataByVendorId(idAsNumber) + + const vendor: Vendor | null = await findVendorById(idAsNumber) + + // 4) 렌더링 + return ( + <Shell className="gap-2"> + {vendor && + <VendorPQAdminReview data={data} vendor={vendor} /> + } + </Shell> + ) +} |
